/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.vinicius.teste;

import br.com.vinicius.hibernate.HibernateUtil;
import org.hibernate.Session;

/**
 *
 * @author
 * viniciuspacheco
 */
public class Conecta {
    
    public static void main(String[] args){
        Session sessao = null;
        try {
            sessao = HibernateUtil.getSessionFactory().openSession();
            System.out.println("Conectou");
        } finally {
            sessao.close();
            System.out.println("Conexao Encerrada");
        }
        
    }
    
}
